package com.ruoyi.common.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.io.Serializable;

/**
 * @ClassName IBaseEnum
 * @Description
 * @Author Small
 * @Date 2019/11/12 16:09
 * @Version 1.0
 **/
public interface IBaseEnum<T extends Serializable> extends IEnum<T>{

    T getValue();

    String getDesp();

    static <T extends  Enum<T> & IEnum> T valueOf(String enumCode, Class<T> clazz) {
        T enumm = Enum.valueOf(clazz, enumCode);
        return enumm;
    }
}
